package com.jsyso.wxapp.api;

import com.jsyso.jsyso.lang.JStringUtils;
import com.jsyso.weixin.api.API;
import com.jsyso.weixin.utils.Params;

/**
 * 用户相关API
 * @author janjan, xujian_jason@163.com
 *
 */
public class UserAPI extends API {
	protected static final String JSCODE2SESSION = "/sns/jscode2session";
	
	/**
	 * code 换取 session_key
	 */
	public API jscode2session(Params params) {
		this.getParams = params.put("grant_type", "authorization_code");
		this.url = JStringUtils.newBuilder(API_WEIXIN_QQ_COM, JSCODE2SESSION).toString();
		return this;
	}
	
}
